import request from '@/utils/request'

// 查询期货策略实例列表
export function listFutureStrategyInstance(query) {
  return request({
    url: '/kylin/futureStrategyInstance/list',
    method: 'get',
    params: query
  })
}

// 查询期货策略实例详细
export function getFutureStrategyInstance(instanceId) {
  return request({
    url: '/kylin/futureStrategyInstance/' + instanceId,
    method: 'get'
  })
}

// 新增期货策略实例
export function addFutureStrategyInstance(data) {
  return request({
    url: '/kylin/futureStrategyInstance',
    method: 'post',
    data: data
  })
}

// 修改期货策略实例
export function updateFutureStrategyInstance(data) {
  return request({
    url: '/kylin/futureStrategyInstance',
    method: 'put',
    data: data
  })
}

// 删除期货策略实例（支持单个和批量）
export function delFutureStrategyInstance(ids) {
  return request({
    url: '/kylin/futureStrategyInstance',
    method: 'delete',
    data: {
      ids: Array.isArray(ids) ? ids : [ids]
    }
  })
}

// 导入期货策略实例
export function importFutureStrategyInstance() {
  return request({
    url: '/kylin/futureStrategyInstance/import',
    method: 'post'
  })
}